package com.reremouse.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Entity
@Table(name = "y_admin")
public class AdminInfo
        implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id")
    private long id = System.nanoTime();
    @Basic(optional = false)
    @Column(name = "urn")
    private String urn;
    @Basic(optional = false)
    @Column(name = "pwd")
    private String pwd;
    @Basic(optional = false)
    @Column(name = "grp")
    private String grp;
    @Basic(optional = false)
    @Column(name = "enabled")
    private Boolean enabled;
    @Basic(optional = false)
    @Column(name = "ltime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date ltime;
    @Column(name = "nickname")
    private String nickname;
    @Basic(optional = false)
    @Column(name = "genTime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date genTime;

    public AdminInfo() {
    }

    public AdminInfo(long id) {
        this.id = id;
    }

    public AdminInfo(long id, String urn, String pwd, String grp, Boolean enabled, Date ltime, Date genTime) {
        this.id = id;
        this.urn = urn;
        this.pwd = pwd;
        this.grp = grp;
        this.enabled = enabled;
        this.ltime = ltime;
        this.genTime = genTime;
    }

    public long getId() {
        return this.id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getUrn() {
        return this.urn;
    }

    public void setUrn(String urn) {
        this.urn = urn;
    }

    public String getPwd() {
        return this.pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getGrp() {
        return this.grp;
    }

    public void setGrp(String grp) {
        this.grp = grp;
    }

    public Boolean getEnabled() {
        return this.enabled;
    }

    public void setEnabled(Boolean enabled) {
        this.enabled = enabled;
    }

    public Date getLtime() {
        return this.ltime;
    }

    public void setLtime(Date ltime) {
        this.ltime = ltime;
    }

    public String getNickname() {
        return this.nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public Date getGenTime() {
        return this.genTime;
    }

    public void setGenTime(Date genTime) {
        this.genTime = genTime;
    }
}

